//package com.glsc.ngateway.flowable.config;
//
//import org.flowable.engine.cfg.AbstractProcessEngineConfigurator;
//import org.flowable.spring.SpringProcessEngineConfiguration;
//import org.flowable.spring.job.service.SpringAsyncExecutor;
//import org.springframework.boot.context.properties.ConfigurationProperties;
//import org.springframework.boot.jdbc.DataSourceBuilder;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.annotation.Primary;
//import org.springframework.transaction.PlatformTransactionManager;
//
//import javax.sql.DataSource;
//import java.io.IOException;
//
//@Configuration//声名为配置类，继承Activiti抽象配置类
//public class ActivitiConfig extends AbstractProcessEngineConfigurator {
//    //AbstractProcessEngineAutoConfiguration
//    @Bean
//    @Primary
//    @ConfigurationProperties(prefix = "spring.datasource.master")
//    public DataSource masterDataSource() {
//        return DataSourceBuilder.create().build();
//    }
//
//    @Bean
//    @Primary
//    @ConfigurationProperties(prefix = "spring.datasource.mysql")
//    public DataSource activitiDataSource() {
//        return DataSourceBuilder.create().build();
//    }
//
//    @Bean
//    public SpringProcessEngineConfiguration springProcessEngineConfiguration(
//            PlatformTransactionManager transactionManager,
//            SpringAsyncExecutor springAsyncExecutor) throws IOException {
//
//        return baseSpringProcessEngineConfiguration(
//                activitiDataSource(),
//                transactionManager,
//                springAsyncExecutor);
//    }
//}